package com.yjz.ui.banner.core;

import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.viewpager.widget.ViewPager;

import com.yjz.ui.banner.indicator.BannerIndicator;

import java.util.List;

/**
 * 作用 :
 * 作者 : yjz
 * 时间 : 2024/10/21 15:05
 */
public interface IBanner {

    void setBannerData(@LayoutRes int layoutResId, @NonNull List<? extends BannerModel> models);

    void setBannerData(@NonNull List<? extends BannerModel> models);

    void setBannerIndicator(BannerIndicator indicator);

    void setAutoPlay(boolean autoPlay);

    void setLoop(boolean loop);

    void setIntervalTime(int intervalTime);

    void setBindAdapter(IBannerBindAdapter bindAdapter);

    void setOnPageChangeListener(ViewPager.OnPageChangeListener onPageChangeListener);

    void setOnBannerClickListener(OnBannerClickListener onBannerClickListener);

    void setScrollDuration(int duration);

    interface OnBannerClickListener {
        void onBannerClick(@NonNull BannerAdapter.ViewHolder viewHolder, @NonNull BannerModel bannerMo, int position);
    }
}
